package com.szl.group.utils.video;

public class Main {

    public static void main(String[] args) {
        String originUrlpath = "http://1301806665.vod2.myqcloud.com/e3457526vodcq1301806665/36b3dcdb5285890807933929546/playlist_eof.m3u8";
        String preUrlPath = originUrlpath.substring(0, originUrlpath.lastIndexOf("/") + 1);
        String rootPath = "E:\\";
        String fileName = "myhls";
        HlsDownloader downLoader = new HlsDownloader(originUrlpath, preUrlPath, rootPath);
        //downLoader.setThreadQuantity(10);
        try {
            fileName = downLoader.download(false);
        } catch (Exception e) {

        }

        if (fileName.isEmpty()) {
            System.out.println("下载失败");
        } else {
            System.err.println("下载成功");
        }
    }
}
